package j04lock;



public class J1 {
    //票
    static int count = 100;
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            while (count>0){
                System.out.println("t1卖票-"+count);
                count--;//99
            }
        });
        Thread t2 = new Thread(()->{
            while (count>0){
                System.out.println("t222222卖票-"+count);
                count--;//98
            }
        });
        t1.start();
        t2.start();
    }

}
